package org.objective.service;

import java.util.UUID;
import org.common.service.Service;
import org.objective.base.BaseFieldInfo;
import org.objective.base.BaseObjectInfo;
import org.objective.base.BaseTypeInfo;
import org.objective.dal.BeanFactory;
import org.objective.command.CommandResult;
import org.objective.dal.ColumnMapper;
import org.objective.dal.DalServiceProvider;
import org.objective.dal.RowValueCollection;
import org.objective.base.CommonObjectList;

/**
 *
 * @author gus
 */
@Service(serviceProvider = DalServiceProvider.class)
public interface DalService
{
    public CommandResult<Boolean> checkExistType(UUID oid);

    public CommandResult<CommonObjectList> getAllObjects(ColumnMapper rowMapper);

    public CommandResult<Long> getSequenceIDForBaseOject();

    public CommandResult<Long> getSequenceIDForBaseType();

    public CommandResult<RowValueCollection> getUserRowValueCollection(BeanFactory rowMapper, Interval interval) throws Exception;

    public void insertObject(BaseObjectInfo info) throws Exception;

    public void insertType(BaseTypeInfo info) throws Exception;

    public CommandResult<BaseFieldInfo> loadFieldInfo(long fieldID);

    public CommandResult<BaseObjectInfo> loadObjectInfo(long objectID);

    public CommandResult<BaseTypeInfo> loadTypeInfo(long typeID);
}
